home *** CD-ROM | disk | FTP | other *** search
/ ftp.cs.arizona.edu / ftp.cs.arizona.edu.tar / ftp.cs.arizona.edu / icon / newsgrp / group97b.txt / 000080_icon-group-sender _Wed Sep 24 16:23:13 1997.msg < prev    next >
Internet Message Format  |  2000-09-20  |  2KB

  1. Return-Path: <icon-group-sender>
  2. Received: from kingfisher.CS.Arizona.EDU (kingfisher.CS.Arizona.EDU [192.12.69.239])
  3.     by cheltenham.cs.arizona.edu (8.8.7/8.8.7) with SMTP id QAA08740
  4.     for <icon-group-addresses@cheltenham.CS.Arizona.EDU>; Wed, 24 Sep 1997 16:23:12 -0700 (MST)
  5. Received: by kingfisher.CS.Arizona.EDU (5.65v4.0/1.1.8.2/08Nov94-0446PM)
  6.     id AA10180; Wed, 24 Sep 1997 16:23:12 -0700
  7. To: icon-group@cs.arizona.edu
  8. Date: Wed, 24 Sep 1997 22:30:42 GMT
  9. From: (Pete M. Wilson)
  10. Message-Id: <34299413.10548025@stripey.gamewood.net>
  11. Organization: Danville Regional Medical Center
  12. Sender: icon-group-request@cs.arizona.edu
  13. References: <Stuart.Robinson-2309971812040001@asianstmg-221.anu.edu.au>
  14. Subject: Re: another program with problems
  15. Errors-To: icon-group-errors@cs.arizona.edu
  16. Status: RO
  17.  
  18. Stuart.Robinson@anu.edu.au (Stuart Robinson) wrote:
  19.  
  20. >Hello.  I'm sorry to keep posting my programs to comp.lang.icon for
  21. >editorial comments, but I have no local Icon support.  Anyhow, I have a
  22. >program that is producing output that I wouldn't expect, given the input. 
  23. >Here's the program:
  24. >
  25. ... omitted ...
  26. >            while tab(upto("{") +1) do    #move just past bracket (will
  27. >fail if there is none)
  28. >               {
  29. >               wordfrag := move(1)        #wordfrag = one character past bracket
  30. >               
  31. ... omitted ...
  32. >It seems the lines with a single curly brackets are being treated as lines
  33. >with "{O".  What gives?
  34. >
  35.  
  36. At a quick glance, I would say that on the lines with just open
  37. braces, the assignment to wordfrag fails, since the move(1) fails,
  38. since that is the end of the line. So wordfrag remains the last value
  39. it was assigned, which is "0". If you change the last {0 to something
  40. else, I bet the open brace lines will act like that instead. Try
  41. either doing if (wordfrag := move(1)) to protect the following code.
  42.  
  43.  
  44. Pete M. Wilson
  45. Gamewood Data Systems Internet Service
  46. wilsonpm@gamewood.net
  47.